
package com.sage.commons;

import java.util.HashMap;
import java.util.Map;

import org.springframework.web.client.RestTemplate;

public class RestTemplateTest {

	public static void main(String[] args) {
		RestTemplate rest = new RestTemplate();
		Map<String, String> map = new HashMap<String, String>();
		map.put("username", "Saleson");
		map.put("vcode", "9521");
		map.put("password", "123456");
		map.put("repassword", "123456");
		map.put("nickname", "我是谁");
		map.put("usergroup", "1");
		//String msg = rest.postForObject("http://api.beixinmei.com/Appapi/Register", map, String.class);
		//String msg = rest.postForObject("http://121.40.105.61/beixinmei_to_dz/Appapi/Register", null, String.class, map);
		String msg = rest.postForObject("http://localhost:8080/", null, String.class, map);
		System.out.println("@"+msg);
	}
}
